﻿namespace UnityEditor.Controls.ProjectControl.ViewModel
{
    using System.Collections.Generic;

    internal sealed class ProjectItemFilter
    {
        private List<string> invalidSuffix = new List<string>();

        private List<string> containStrings = new List<string>();

        public ProjectItemFilter()
        {
            invalidSuffix.Clear();
            containStrings.Clear();

            containStrings.Add("svn");
        }

        public bool IsValidTreeItem(ProjectItem treeItem)
        {
            if (treeItem == null)
                return false;

            foreach (var s in containStrings)
            {
                if (treeItem.FullPath.Contains(s))
                    return false;
            }
            return true;
        }
    }
}
